********************************************************************************
*																			   *
*						Sir! I'd Rather Go to School Sir!					   *
*																			   *
*								 Mahdi Majbouri								   *
*																			   *
*									Table A2								   *
*																			   *
*									6-6-2023								   *
*																			   *
********************************************************************************


********************************************************************************
**  Test for discontinuity in the number of observations
********************************************************************************

use "census11-all.dta", clear

keep if fage>=fage18 & fage18>=threshold - 9 & fage18<=threshold + 10 & ///
		father_ed !=. & mom_ed != . & fage !=. & mage !=.

keep if relate == 3 & son == 1 & sons == 1 & urban == 2

gen number = 1
collapse (mean) t tfa fasq facb tfasq tfacb fage18 (sum) number, by(fa)

regress number t fa tfa, vce(cluster fa)
outreg2 using "Table A2", excel adjr2 se alpha(0.01,0.05,0.10) ///
		symbol(***,**,*) bdec(3) sdec(3) rdec(3) ctitle("Total") replace

regress number t fa tfa fasq tfasq, vce(cluster fa)
outreg2 using "Table A2", excel adjr2 se alpha(0.01,0.05,0.10) ///
		symbol(***,**,*) bdec(3) sdec(3) rdec(3) ctitle("Total") append

regress number t fa tfa fasq tfasq facb tfacb, vce(cluster fa)
outreg2 using "Table A2", excel adjr2 se alpha(0.01,0.05,0.10) ///
		symbol(***,**,*) bdec(3) sdec(3) rdec(3) ctitle("Total") append


	
********************************************************************************
*********************************  THE END *************************************
********************************************************************************
